package com.zhou.utils.enums;

public enum BooleanEnum {
    TURE("ture",1),
    FLASE("flase",0);
    /**
     * 主键
     */
    private final String key;
    /**
     * 描述
     */
    private final Integer desc;
    BooleanEnum(final String key, final Integer desc) {
        this.key = key;
        this.desc = desc;
    }
    public static BooleanEnum getFieldKey(String key) {
        for (BooleanEnum value : BooleanEnum.values()) {
            if (value.getKey().equals(key)) {
                return value;
            }
        }
        return BooleanEnum.TURE;
    }
    public String getKey() {
        return this.key;
    }

    public Integer getResultValue() {
        return this.desc;
    }
}
